<template>
	<div>
		<div id="container">
			<button :class="{disabled: longPage}"
			@click="longPage = true">长</button>
			<button :class="{disabled: !longPage}"
			@click="longPage = false">短</button>
			<div id="long_div" v-show="longPage">
				<p v-for="n in 10">h</p><p>h</p><p>h</p><p>h</p><p>h</p><p>h</p><p>h</p><p>h</p>
				<p v-for="n in 10">6</p><p>6</p><p>6</p><p>6</p><p>6</p><p>6</p><p>6</p><p>6</p>
				<p v-for="n in 10">※</p><p>※</p><p>※</p><p>※</p><p>※</p><p>※</p><p>※</p><p>※</p>
				<p v-for="n in 10">❤</p>
			</div>
			<!-- pop -->
			<div id="pop_container">
				<div id="pop">
					<input value="我是input框">
				</div>
			</div>
		</div>
		<div id="bottom">
			<input value="我是底部input框">
		</div>
	</div>
</template>
<script>
	export default{
		name: 'test',
		mounted(){
			document.getElementById('container').style.height = window.innerHeight + 'px';
		},
		data(){
			return{
				longPage: true
			}
		}
	}
</script>
<style lang='less' scoped>
	#long_div{
		font-size: .3rem;
	}
	.disabled{
		opacity: .5;
	}
	#pop_container{
		display: none;
		background: rgba(0,0,0,.3);
		position: fixed;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		#pop{
			width: 50%;
			height: 4rem;
			background: pink;
			margin: 30% auto;
			input{
				width: 100%;
			}
		}
	}
	#container{
		overflow-y: scroll;
		position: relative;
	}
	#bottom{
		position: absolute;
		bottom:0;
		left: 0;
		background: skyblue;
		width: 100%;
		height: 2rem;
	}
</style>